#define _CRT_SECURE_NO_WARNINGS 1



#include<stdio.h>
#include<stdlib.h>

int my_atoi(char* arr)
{
	int x = 0, y = 0;
	while (*arr)
	{
		x = *arr - '0';
		y = y * 10 + x;
		arr++;
	}
	return y;
}
int main()
{
	char arr[] = "1234";
	printf("%d\n", my_atoi(arr));

	return 0;
}